package beans.factory.support;

import beans.BeansException;
import beans.factory.config.BeanDefinition;

import java.lang.reflect.Constructor;

/**
 * @Author: Take-off
 * @Description: //TODO 实例化策略接口
 * @Date: 8:56 PM 2022/12/13
 **/
public interface InstantiationStrategy {

    /**
     * @Author: Take-off
     * @Description: //TODO
     * @Date: 8:57 PM 2022/12/13
     * @Param: [beanDefinition, beanName, ctor, args] :ctor - 获取与入参信息相对应的构造函数
     * @return: java.lang.Object
     **/
    Object instantiate(BeanDefinition beanDefinition, String beanName, Constructor ctor, Object[] args) throws BeansException;

}
